<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Job Hunter - processus</title>
</head>
<body>

	<div id="breadcrumb">
		<a href="/main" >accueil</a> >
		<a href="/processesList" >processus</a>
		 > processus
	</div>
	<div>
		<h1>Process n°${process.id }</h1>
		<div>ID : ${process.id }</div>
		<div>company : ${process.company.name }</div>
		<div>name : ${process.name }</div>
		<div>description : ${process.description }</div>
	</div>
	
	<article>
	
	<h2>Liste des actions</h2><a href="addAction?procId=${process.id}"><%@ include file="/img/addB.svg"%></a>
	<table class="dataTable display compact" >
		<thead>
			<tr>
				<th>ID</th>
				<th>name</th>
				<th>actionDate</th>
				<th>realized </th>
				<th>state </th>
				<th>cv </th>
				<th>motivationLettre </th>
				<th>description </th>
				<th>communicationType </th>
				<th>actionType </th>
				<th>process </th>
				<th>contact </th>
				<th></th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${process.actions}" var="action"> 			
				<tr>
					<td>${action.id }</td>
					<td>${action.name }</td>
					<td>${action.actionDateString }</td>
					<td>${action.realized }</td>
					<td>${action.state }</td>
					<td>${action.cv }</td>
					<td>${action.motivationLettre }</td>
					<td>${action.description }</td>
					<td>${action.communicationType }</td>
					<td>${action.actionType }</td>
					<td>${action.process.name }</td>
					<td>${action.contact.firstName } ${action.contact.lastName }</td>				
					<td>
						<a href="action?id=${action.id }&procId=${process.id}"><%@ include file="/img/seeB.svg"%></a> 
						<a href="updAction?id=${action.id }&procId=${process.id}"><%@ include file="/img/updB.svg"%></a>
						<a href="delAction?id=${action.id }&procId=${process.id}"><%@ include file="/img/delB.svg"%></a></td>
				</tr>
			</c:forEach>	
		</tbody>	
	</table>
	</article>
</body>
</html>